﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 字符串分割
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] names = new string[3] { "linda", "aimy", "lucy" };

            Console.WriteLine(cutstring(names, "|"));

            Console.ReadKey();
        }

        static string cutstring(string[] names, string cutStr)
        {
            string outPut = "";

            for (int i = 0; i < names.Length; i++)
            {
                if (i > 0)
                {
                    outPut += cutStr;
                }
                outPut += names[i];
            }

            return outPut;
        }
    }
}
